package com.yehongyu.mytools.basic.grammar;

public class Java007_PointNumber {

	public static void samplePointZero() {
		System.out.println(1.0/0);
		System.out.println(1.0/-0.0);
	}
	
	public static boolean sampleMethod(double d) {
		return (d != d);
	}
	
	public static void main(String[] args) {
		//测试浮点数
		samplePointZero();
		//如何调用sampleMethod，使返回值为true
		System.out.println(sampleMethod(Double.NaN));
		System.out.println(Double.NaN == Double.longBitsToDouble(0x7ff8000000000000L));
	}
}
